package cc.linker.steplink.crm.dao;

import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ScoreLogDao {
    List<Map<String, Object>> listScore(Map<String, String> map);

    boolean add(Map<String, Object> map);

    boolean addGrowth(Map<String, Object> map);

    List<Map<String, Object>> listScoreLogByOrgIdWhereNotScored(@Param("orgId") String orgId, @Param("lastOpenTime") String lastOpenTime);

    List<Map<String, Object>> listScoreLogByOrgIdWhereNotLeveled(@Param("orgId") String orgId, @Param("lastOpenTime") String lastOpenTime);

    void updateSendStateByPrimaryKeyAfterScore(String scoreLogId);

    void updateSendStateByPrimaryKeyAfterScoreGroup(String scoreLogId);

    List<Map<String, Object>> listScoreLogByOrgIdWhereNotScoredSum(@Param("orgId") String orgId, @Param("lastOpenTime") String lastOpenTime);

    List<Map<String, Object>> listScoreLogByOrgIdWhereNotLeveledSum(@Param("orgId") String orgId, @Param("lastOpenTime") String lastOpenTime);

    void updateSendStateByPrimaryKeyAfterLevel(String scoreLogId);

    void updateSendStateByPrimaryKeyAfterLevelGroup(String scoreLogId);

    void updateSubscribeByCustomerId(@Param("subscribe") String subscribe,@Param("customerId") String customerId);

    List<Map<String, Object>> listGrowth(Map<String, String> map);

}
